package com.qd.panda.mapper.wallet.user;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.qd.common.panda.domain.entity.wallet.user.UserWalletConsumptionLogDTO;
import com.qd.common.panda.domain.entity.wallet.user.UserWalletConsumptionLogStatisticsDTO;
import com.qd.panda.model.UserWalletConsumptionLog;
import org.apache.ibatis.annotations.Param;

/**
 * 用户钱包消费记录
 *
 * @author sjk
 */
public interface UserWalletConsumptionLogMapper extends BaseMapper<UserWalletConsumptionLog> {
    /**
     * 分页
     *
     * @param page  分页属性
     * @param query 查询条件
     * @return 数据
     */
    IPage<UserWalletConsumptionLogDTO> page(IPage<UserWalletConsumptionLog> page, @Param(Constants.WRAPPER) Wrapper<UserWalletConsumptionLog> query);

    /**
     * 统计消费金额
     * @param query 查询条件
     * @return 消费金额
     */
    UserWalletConsumptionLogStatisticsDTO sumAmount(@Param(Constants.WRAPPER) Wrapper<UserWalletConsumptionLog> query);
}